cmake_minimum_required(VERSION 3.28)
project(chat_server CXX)
set(CXX_STANDARD_REQUIRED 14)

include_directories(./include)
include_directories(./rpc_src)
aux_source_directory(./src  src_file)
aux_source_directory(./rpc_src rpc_src_file)

find_package(Threads REQUIRED)
find_package(Protobuf CONFIG REQUIRED)
find_package(gRPC CONFIG REQUIRED)


add_executable(chat_server ${src_file} ${rpc_src_file} )

# 连接库
target_link_libraries(chat_server hiredis)
target_link_libraries(chat_server gRPC::grpc++ protobuf::libprotobuf gRPC::grpc++_reflection )
target_link_libraries(chat_server mysqlcppconn )
